
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" src="http://www.lodop.net/demolist/LodopFuncs.js"></script>
</head>
<body>
<a href="javascript:myDesign()"><b>打印设计</b></a>
<script language="javascript" type="text/javascript">        
        var LODOP; //声明为全局变量       
	function myPrint() {		       
		CreatePrintPage();       
		LODOP.PRINT();		       
	};         
	function myPrintA() {		       
		CreatePrintPage();       
		LODOP.PRINTA();		       
	};  	       
	function myPreview() {		       
		CreatePrintPage();       
		LODOP.PREVIEW();		       
	};		       
	function mySetup() {		       
		CreatePrintPage();       
		LODOP.PRINT_SETUP();		       
	};	       
	function myDesign() {		       
		CreatePrintPage();       
		LODOP.PRINT_DESIGN();		       
	};	       
	function myBlankDesign() {       
		LODOP=getLodop();         
   		LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_空白练习");		       
		LODOP.PRINT_DESIGN();		       
	};			       
	function CreatePrintPage() {       
		LODOP=getLodop();         

		LODOP.PRINT_INITA(0,0,310,793,"打印控件功能演示_Lodop功能_空白练习");
		LODOP.SET_PRINT_PAGESIZE(1, 800, 1800, "");

		LODOP.ADD_PRINT_RECT(-4,-7,310,793,0,1);
		LODOP.ADD_PRINT_TEXT(9,107,79,31,"测试单");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",14);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.SET_PRINT_STYLEA(0,"Horient",2);
		LODOP.SET_PRINT_STYLEA(0,"LetterSpacing",2);
		LODOP.ADD_PRINT_TEXT(56,76,121,30,"xxxx店名");
		LODOP.ADD_PRINT_TEXT(97,76,121,29,"xxxx地址");
		LODOP.ADD_PRINT_TEXT(137,74,124,29,"xxxx电话");
		LODOP.ADD_PRINT_TEXT(175,74,125,27,"收银员xxxx");
		LODOP.ADD_PRINT_TEXT(209,75,123,26,"服务员xxxx");
		LODOP.ADD_PRINT_TEXT(243,11,100,20,"单号：15201");
		LODOP.ADD_PRINT_TEXT(244,183,105,20,"16/02/2019 17:19");
		LODOP.ADD_PRINT_LINE(300,-14,301,378,4,1);
		LODOP.ADD_PRINT_TABLE(347,1,300,164,"(超文本11表格的HTML代码内容)");
		LODOP.ADD_PRINT_TEXT(533,174,98,25,"总计：$30.5");
		LODOP.ADD_PRINT_TEXT(572,172,100,25,"现金");
		LODOP.ADD_PRINT_TEXT(618,51,166,26,"欢迎下次光临");
		
	};   

	
    
	function myAddHtml() {       
		LODOP=getLodop();         
   		LODOP.PRINT_INIT("");		            
		LODOP.ADD_PRINT_HTM(10,55,"100%","100%",document.getElementById("textarea01").value);	       
	};	       
</script>        
       
       
</body>       
</html>